local befriendattacking = fk.CreateSkill {
  name = "lvshi__befriendattacking_skill",
}
local ls = require "packages/lvshi/utility"

Fk:loadTranslationTable{
  ["lvshi__befriendattacking"] = "远交近攻",
  [":lvshi__befriendattacking"] = "<b>锦囊牌</b><br /><b>时机</b>：出牌阶段<br /><b>目标</b>：一名明置身份且与你阵营不同的角色。<br /><b>效果</b>：目标角色摸一张牌，你摸三张牌。",
  ["#lvshi__befriendattacking_skill"] = "目标角色摸一张牌，你摸三张牌",
}

befriendattacking:addEffect("cardskill", {
  prompt = "#lvshi__befriendattacking_skill",
  target_num = 1,
  mod_target_filter = function(self, player, to_select, selected, card)
    return to_select.role_shown and not ls.isFriend(player, to_select)
  end,
  target_filter = Util.CardTargetFilter,
  --[[on_use = function(self, room, use)
    local choice = ls.strategytrickuse(use.from, use.card, "befriendattacking_scheme", "befriendattacking_courage")
    use.extra_data = use.extra_data or {}
    use.extra_data.strategy = choice
  end,]]
  on_effect = function(self, room, effect)
    effect.to:drawCards(1, befriendattacking.name)
    if not effect.from.dead then
      effect.from:drawCards(3, befriendattacking.name)
    end
  end,
})

return befriendattacking